package com.gitee.feizns.quickstart.jackson.annotation;

import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.gitee.feizns.quickstart.jackson.serializer.ToSingletonArraySerializer;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 将json节点的值用数组包装
 * @see ToSingletonArraySerializer
 * @author feizns
 * @since 2023/4/2
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@JacksonAnnotationsInside
@JsonSerialize(using = ToSingletonArraySerializer.class)
public @interface JsonToSingletonArray {
}
